package Panels;

import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import Code.TablePanelInfo;
import DatabaseCommands.DatabaseInfo;


public class Results extends JPanel{
	
	DatabaseInfo DInfo=DatabaseInfo.getInstance();
	private TablePanelInfo TPInfo;
	
	public Results(TablePanelInfo TPanelInfo){
		TPInfo=TPanelInfo;
		setLayout(new BorderLayout());
		JTabbedPane TabbedFrame=new JTabbedPane();
		TabbedFrame.addTab("Query Results",new QueryResults(TPInfo));
		if(DInfo.CurrentTable!=null && TPInfo.TableName!=null && TPInfo.TableName==DInfo.CurrentTable.GetTableName()){
			TabbedFrame.addTab("Table View",new TableView());
		}
		
		add(TabbedFrame,BorderLayout.CENTER);
		
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

}
